package com.jzd1997.lesson20;

/**
 * @Author: jiangzd
 * @Date: 11:28 2019/7/26
 */
public class LazySingleton {
    private static LazySingleton logger = null;
    private LazySingleton(){
        System.out.println("生成LazyLogger实例一次！");
    }

    public static LazySingleton getInstance(){
        if(logger==null){
            logger = new LazySingleton();
        }
        return logger;
    }
}
